<template>
	<view>
		<u--image 
			v-if="data.src.length"
			:src="data.src?data.src:''"
			:mode="data.mode?data.mode:'aspectFill'"
			:width="data.width?data.width:300"
			:height="data.height?data.height:225"
			:shape="data.shape?data.shape:'square'"
			:radius="data.radius?data.radius:0"
			:lazy-load="data.lazyLoad&&(data.lazyLoad===true||data.lazyLoad==1)?true:false"
			:show-menu-by-longpress="data.showMenuByLongpress&&(data.showMenuByLongpress===true||data.showMenuByLongpress==1)?true:false"
			:fade="data.fade&&(data.fade===true||data.fade==1)?true:false"
			:duration="data.duration?data.duration:500"
			:bg-color="data.bgColor?data.bgColor:'#f3f4f6'"
		>
			<view slot="error" style="font-size: 24rpx;">加载失败</view>
			<view slot="loading" style="font-size: 24rpx;">加载中</view>
		</u--image>
	</view>
</template>

<script>
	export default {
		name:"mx-img",
		data() {
			return {
				
			};
		},props:{
			data:{
				type:Object,
				default:{
				}
			}
		}
	}
</script>

<style>

</style>